//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#if _MSC_VER > 1000
#pragma once
#endif

#ifndef __wtypes_h__
#define __wtypes_h__

#ifdef __cplusplus
extern "C"{
#endif

/* Forward Declarations */

/* header files for imported files */
#include "ztmach.h"

#ifndef ___Zyc_wtypes_INTERFACE_DEFINED__
#define ___Zyc_wtypes_INTERFACE_DEFINED__

/* interface _Zyc_wtypes */
/* [auto_handle][unique][uuid] */

#ifndef FALSE
#define FALSE 0
#define TRUE 1
#endif
typedef /* [transmit_as] */ void *PTR;

typedef UInt32 ZID;

typedef /* [string] */ WCHAR *WSTR;

typedef /* [string] */ const WCHAR *CWSTR;

typedef WCHAR *PWCHAR;

#ifdef _MSC_VER
#undef  MODENTRY
#define MODENTRY __stdcall
#define METHODCALLTYPE __stdcall
#define THREAD_LINKAGE __stdcall
#else
#undef  MODENTRY
#define MODENTRY
#define METHODCALLTYPE
#define THREAD_LINKAGE
#endif
#define MCT METHODCALLTYPE
#ifdef __cplusplus
#define VARARGS ...
#else
#define VARARGS
#endif
/* Include linkage specification and VARARGS in C/C++ declaration */
typedef SCODE (METHODCALLTYPE *METHOD)(VARARGS);
#ifndef VTBL_DEFINED
#define VTBL_DEFINED
typedef /* [transmit_as] */ const METHOD *VTBL;

#endif
typedef unsigned char *XSIGNATURE;

#ifndef XTBL_DEFINED
#define XTBL_DEFINED
typedef /* [transmit_as] */ XSIGNATURE *XTBL;

#endif
#define    CRITICAL ( 1 )

#define    NONCRITICAL ( 0 )

typedef /* [transmit_as] */ Int32 CRITICALITY;

#ifdef __cplusplus
/* work-around VC++ bug that produces warning 4705 */
typedef struct _TIME_CONSTRAINT {
    inline _TIME_CONSTRAINT() {};
    inline ~_TIME_CONSTRAINT() {};
    TIME        Start;
    TIME        Estimate;
    TIME        Deadline;
    CRITICALITY Criticality;
} TIME_CONSTRAINT, *PTIME_CONSTRAINT;
#else
typedef struct  _TIME_CONSTRAINT
    {
    TIME Start;
    TIME Estimate;
    TIME Deadline;
    CRITICALITY Criticality;
    }    TIME_CONSTRAINT;

typedef struct _TIME_CONSTRAINT *PTIME_CONSTRAINT;

#endif

#if !defined(_MUTEX_)
#define _MUTEX_
#ifdef __cplusplus
/* work-around VC++ bug that produces warning 4705 */
typedef struct _MUTEX {
    inline _MUTEX() {};
    inline ~_MUTEX() {};
    UInt32 _mutex_state[MUTEX_STATE_SIZE];
} MUTEX, *PMUTEX;
#else
typedef struct  _MUTEX {
    UInt32 _mutex_state[ 2 ];
} MUTEX;
typedef struct _MUTEX *PMUTEX;

#endif
#endif //! _MUTEX_

#if !defined(_CONDITION_)
#define _CONDITION_

#ifdef __cplusplus
/* work-around VC++ bug that produces warning 4705 */
typedef struct _CONDITION {
    inline _CONDITION() {};
    inline ~_CONDITION() {};
    UInt32 _cond_state[CONDITION_STATE_SIZE];
} CONDITION, *PCONDITION;
#else
typedef struct  _CONDITION
    {
    UInt32 _cond_state[ 1 ];
    }    CONDITION;

typedef struct _CONDITION *PCONDITION;

#endif
#endif // !_CONDITION_

#ifdef __cplusplus
/* work-around VC++ bug that produces warning 4705 */
typedef struct _RWLOCK {
    inline _RWLOCK() {};
    inline ~_RWLOCK() {};
    UInt32 _rwlock_state[RWLOCK_STATE_SIZE];
} RWLOCK, *PRWLOCK;
#else
typedef struct  _RWLOCK
    {
    UInt32 _rwlock_state[ 2 ];
    }    RWLOCK;

typedef struct _RWLOCK *PRWLOCK;

#endif
typedef INT32 IMPORTANCE;

typedef Int64 RESOURCE_AMOUNT;

#endif /* ___Zyc_wtypes_INTERFACE_DEFINED__ */

/* interface __MIDL_itf_wtypes_0004 */
/* [local] */

typedef struct  _CALLER_INFO
    {
    ZID Pid;
    ZID Tid;
    }    CALLER_INFO;

/* Additional Prototypes for ALL interfaces */

/* end of Additional Prototypes */

#ifdef __cplusplus
}
#endif

#endif
